

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>read_restart command &mdash; LIGGGHTS v3.X documentation</title>
  

  
  
  
  

  

  
  
    

  

  
  
    <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  

  

  
    <link rel="top" title="LIGGGHTS v3.X documentation" href="index.html"/> 

  
  <script src="_static/js/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav" role="document">

   
  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search">
          

          
            <a href="Manual.html" class="icon icon-home"> LIGGGHTS
          

          
          </a>

          
            
            
              <div class="version">
                v3.X
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul>
<li class="toctree-l1"><a class="reference internal" href="Section_intro.html">1. Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_start.html">2. Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_input_script.html">3. Input Script</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_commands.html">4. Commands</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_gran_models.html">5. Contact models</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_mesh_modules.html">6. Mesh modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_packages.html">7. Packages</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_howto.html">8. How-to discussions</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_modify.html">9. Modifying &amp; extending LIGGGHTS(R)-PUBLIC</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_python.html">10. Python interface to LIGGGHTS(R)-PUBLIC</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_errors.html">11. Errors</a></li>
</ul>

            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="Manual.html">LIGGGHTS</a>
        
      </nav>


      
      <div class="wy-nav-content">
        <div class="rst-content">
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="Manual.html">Docs</a> &raquo;</li>
        
      <li>read_restart command</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/read_restart.txt" rel="nofollow"> View page source</a>
          
          <a href="http://www.cfdem.com"> Website</a>
          
            <a href="Section_commands.html#comm" rel="nofollow"> Commands</a>
            
          
        
      </li>
    
  </ul>

  
  <hr/>
  
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="read-restart-command">
<span id="index-0"></span><h1>read_restart command<a class="headerlink" href="#read-restart-command" title="Permalink to this headline">¶</a></h1>
<div class="section" id="syntax">
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>read_restart file
</pre></div>
</div>
<ul class="simple">
<li>file = name of binary restart file to read in</li>
</ul>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>read_restart save.10000
read_restart restart.*
read_restart poly.*.%
</pre></div>
</div>
</div>
<div class="section" id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>Read in a previously saved simulation from a restart file.  This
allows continuation of a previous run.  Information about what is
stored in a restart file is given below.</p>
<p>Restart files are saved in binary format to enable exact restarts,
meaning that the trajectories of a restarted run will precisely match
those produced by the original run had it continued on.</p>
<p>Several things can prevent exact restarts due to round-off effects, in
which case the trajectories in the 2 runs will slowly diverge.  These
include running on a different number of processors or changing
certain settings such as those set by the <a class="reference internal" href="newton.html"><em>newton</em></a> or
<a class="reference internal" href="processors.html"><em>processors</em></a> commands.  LIGGGHTS(R)-PUBLIC will issue a warning in
these cases.</p>
<p>Certain fixes will not restart exactly, though they should provide
statistically similar results.</p>
<p>Certain pair styles will not restart exactly, though they should
provide statistically similar results.  This is because the forces
they compute depend on atom velocities, which are used at half-step
values every timestep when forces are computed.  When a run restarts,
forces are initially evaluated with a full-step velocity, which is
different than if the run had continued.  These pair styles include
<a class="reference internal" href="pair_gran.html"><em>granular pair styles</em></a>.</p>
<p>If a restarted run is immediately different than the run which
produced the restart file, it could be a LIGGGHTS(R)-PUBLIC bug, so consider
<a class="reference internal" href="Section_errors.html#err-2"><span>reporting it</span></a> if you think the behavior is
wrong.</p>
<p>Because restart files are binary, they may not be portable to other
machines.  In this case, you can use the <a class="reference internal" href="Section_start.html#start-7"><span>-r command-line switch</span></a> to convert a restart file to a data
file.</p>
<p>Similar to how restart files are written (see the
<a class="reference internal" href="write_restart.html"><em>write_restart</em></a> and <a class="reference internal" href="restart.html"><em>restart</em></a>
commands), the restart filename can contain two wild-card characters.
If a &#8220;*&#8221; appears in the filename, the directory is searched for all
filenames that match the pattern where &#8220;*&#8221; is replaced with a timestep
value.  The file with the largest timestep value is read in.  Thus,
this effectively means, read the latest restart file.  It&#8217;s useful if
you want your script to continue a run from where it left off.  See
the <a class="reference internal" href="run.html"><em>run</em></a> command and its &#8220;upto&#8221; option for how to specify
the run command so it doesn&#8217;t need to be changed either.</p>
<p>If a &#8220;%&#8221; character appears in the restart filename, LIGGGHTS(R)-PUBLIC expects a
set of multiple files to exist.  The <a class="reference internal" href="restart.html"><em>restart</em></a> and
<a class="reference internal" href="write_restart.html"><em>write_restart</em></a> commands explain how such sets are
created.  Read_restart will first read a filename where &#8220;%&#8221; is
replaced by &#8220;base&#8221;.  This file tells LIGGGHTS(R)-PUBLIC how many processors
created the set and how many files are in it.  Read_restart then reads
the additional files.  For example, if the restart file was specified
as save.% when it was written, then read_restart reads the files
save.base, save.0, save.1, ... save.P-1, where P is the number of
processors that created the restart file.  The processors in the
current LIGGGHTS(R)-PUBLIC simulation share the work of reading these files; each
reads a roughly equal subset of the files.  The number of processors
which created the set can be different the number of processors in the
current LIGGGHTS(R)-PUBLIC simulation.  This can be a fast mode of input on
parallel machines that support parallel I/O.</p>
<hr class="docutils" />
<p>A restart file stores the following information about a simulation:
units and atom style, simulation box size and shape and boundary
settings, group definitions, per-type atom settings such as mass,
per-atom attributes including their group assignments and molecular
topology attributes, force field styles and coefficients, and
<code class="xref doc docutils literal"><span class="pre">special_bonds</span></code> settings.  This means that commands
for these quantities do not need to be re-specified in the input
script that reads the restart file, though you can redefine settings
after the restart file is read.</p>
<p>One exception is that some pair styles do not store their info in
restart files.  The doc pages for individual pair styles note if this
is the case.  This is also true of bond_style hybrid (and angle_style,
dihedral_style, improper_style hybrid).</p>
<p>All settings made by the <code class="xref doc docutils literal"><span class="pre">pair_modify</span></code> command,
such as the shift and tail settings, are stored in the restart file
with the pair style.  The one exception is the <code class="xref doc docutils literal"><span class="pre">pair_modify</span> <span class="pre">compute</span></code> setting is not stored.</p>
<p>The list of <a class="reference internal" href="fix.html"><em>fixes</em></a> used for a simulation is not stored in
the restart file.  This means the new input script should specify all
fixes it will use.  Note that some fixes store an internal &#8220;state&#8221;
which is written to the restart file.  This allows the fix to continue
on with its calculations in a restarted simulation.  To re-enable such
a fix, the fix command in the new input script must use the same
fix-ID and group-ID as was used in the input script that wrote the
restart file.  If a match is found, LIGGGHTS(R)-PUBLIC prints a message indicating
that the fix is being re-enabled.  If no match is found before the
first run or minimization is performed by the new script, the &#8220;state&#8221;
information for the saved fix is discarded.  See the doc pages for
individual fixes for info on which ones can be restarted in this
manner.</p>
<p>Bonds that are broken (e.g. by a bond-breaking potential) are written
to the restart file as broken bonds with a type of 0.  Thus these
bonds will still be broken when the restart file is read.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">No other information is stored in the restart file.
This means that an input script that reads a restart file should
specify settings for quantities like <a class="reference internal" href="timestep.html"><em>timestep size</em></a>,
<a class="reference internal" href="thermo_style.html"><em>thermodynamic</em></a>, <a class="reference internal" href="neighbor.html"><em>neighbor list</em></a>
criteria including settings made via the
<a class="reference internal" href="neigh_modify.html"><em>neigh_modify</em></a> comand, <a class="reference internal" href="dump.html"><em>dump</em></a> file
output, <a class="reference internal" href="region.html"><em>geometric regions</em></a>, etc.</p>
</div>
</div>
<hr class="docutils" />
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
<blockquote>
<div>none</div></blockquote>
</div>
<div class="section" id="related-commands">
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
<p><a class="reference internal" href="read_data.html"><em>read_data</em></a>, <a class="reference internal" href="read_dump.html"><em>read_dump</em></a>,
<a class="reference internal" href="write_restart.html"><em>write_restart</em></a>, <a class="reference internal" href="restart.html"><em>restart</em></a></p>
<p><strong>Default:</strong> none</p>
</div>
</div>


           </div>
           <div class="articleComments">
            
           </div>
          </div>
          <footer>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2016, DCS Computing GmbH, JKU Linz and Sandia Corporation.

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
            URL_ROOT:'./',
            VERSION:'v3.X',
            LANGUAGE:'None',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
            HAS_SOURCE:  true,
            SOURCELINK_SUFFIX: ''
        };
    </script>
      <script type="text/javascript" src="_static/jquery.js"></script>
      <script type="text/javascript" src="_static/underscore.js"></script>
      <script type="text/javascript" src="_static/doctools.js"></script>

  

  
  
    <script type="text/javascript" src="_static/js/theme.js"></script>
  

  
  
  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.StickyNav.enable();
      });
  </script>
   

</body>
</html>